export function useRefresh(cb) {
// 下拉刷新的
  const loading = ref(false);
  const count = ref(0);
  const onRefresh = () => {
    const timer =  setTimeout(() => {
      showToast('刷新成功');
      loading.value = false;
      count.value++;
      cb()

      // if(timer){
      //   clearTimeout(timer)
      // }
    }, 1000);
  };
  return {
    loading,
    count,
    onRefresh
  }
}
